// 工序流转统计的mock数据
export const processStatsMockData = {
  // 产品选项
  productOptions: [
    { id: 1, name: '高压阀门A型' },
    { id: 2, name: '液压泵B型' },
    { id: 3, name: '精密轴承C型' },
    { id: 4, name: '控制器D型' }
  ],
  
  // 工序效率数据
  efficiencyData: [
    { processName: '原材料检验', avgProcessTime: 2.5, minProcessTime: 1.8, maxProcessTime: 4.2, stdDeviation: 0.7, batchCount: 32, efficiencyIndex: 85 },
    { processName: '下料', avgProcessTime: 3.2, minProcessTime: 2.1, maxProcessTime: 5.6, stdDeviation: 0.9, batchCount: 32, efficiencyIndex: 78 },
    { processName: '机加工', avgProcessTime: 8.5, minProcessTime: 5.2, maxProcessTime: 12.8, stdDeviation: 2.1, batchCount: 32, efficiencyIndex: 65 },
    { processName: '热处理', avgProcessTime: 6.8, minProcessTime: 4.5, maxProcessTime: 9.2, stdDeviation: 1.4, batchCount: 30, efficiencyIndex: 72 },
    { processName: '装配', avgProcessTime: 4.3, minProcessTime: 3.1, maxProcessTime: 7.5, stdDeviation: 1.1, batchCount: 28, efficiencyIndex: 81 },
    { processName: '质量检测', avgProcessTime: 3.7, minProcessTime: 2.4, maxProcessTime: 5.9, stdDeviation: 0.8, batchCount: 28, efficiencyIndex: 88 },
    { processName: '包装', avgProcessTime: 1.9, minProcessTime: 1.2, maxProcessTime: 3.1, stdDeviation: 0.5, batchCount: 26, efficiencyIndex: 92 }
  ],
  
  // 瓶颈工序数据
  bottleneckData: [
    { processName: '原材料检验', avgWaitTime: 1.2, avgProcessTime: 2.5, exceptionRate: 3, bottleneckIndex: 25, factors: '供应商交期不稳定' },
    { processName: '下料', avgWaitTime: 0.8, avgProcessTime: 3.2, exceptionRate: 4, bottleneckIndex: 30, factors: '设备调试时间长' },
    { processName: '机加工', avgWaitTime: 4.5, avgProcessTime: 8.5, exceptionRate: 12, bottleneckIndex: 85, factors: '设备故障率高，工艺复杂' },
    { processName: '热处理', avgWaitTime: 2.8, avgProcessTime: 6.8, exceptionRate: 8, bottleneckIndex: 65, factors: '批次等待时间长' },
    { processName: '装配', avgWaitTime: 1.5, avgProcessTime: 4.3, exceptionRate: 5, bottleneckIndex: 35, factors: '零部件配合问题' },
    { processName: '质量检测', avgWaitTime: 0.9, avgProcessTime: 3.7, exceptionRate: 2, bottleneckIndex: 20, factors: '检测设备精度波动' },
    { processName: '包装', avgWaitTime: 0.5, avgProcessTime: 1.9, exceptionRate: 1, bottleneckIndex: 15, factors: '包装材料供应不及时' }
  ],
  
  // 瓶颈报告
  bottleneckReport: {
    mainBottleneck: '机加工',
    secondaryBottleneck: '热处理',
    analysis: '机加工工序是主要瓶颈，主要由于设备故障率高和工艺复杂导致处理时间长，异常率达12%。热处理工序为次要瓶颈，主要问题是批次等待时间长，影响整体生产流程。',
    recommendations: '建议增加机加工设备维护频次，优化工艺流程，减少调试时间。针对热处理工序，可以优化生产计划，减少批次等待时间，提高设备利用率。'
  },
  
  // 生产周期数据
  cycleData: [
    { batchCode: 'B2023001', productName: '高压阀门A型', startDate: '2023-01-05', endDate: '2023-01-18', cycleDays: 13, plannedCycleDays: 12, cycleDiff: 1 },
    { batchCode: 'B2023002', productName: '液压泵B型', startDate: '2023-01-10', endDate: '2023-01-25', cycleDays: 15, plannedCycleDays: 16, cycleDiff: -1 },
    { batchCode: 'B2023003', productName: '精密轴承C型', startDate: '2023-01-15', endDate: '2023-02-02', cycleDays: 18, plannedCycleDays: 15, cycleDiff: 3 },
    { batchCode: 'B2023004', productName: '控制器D型', startDate: '2023-02-01', endDate: '2023-02-12', cycleDays: 11, plannedCycleDays: 12, cycleDiff: -1 },
    { batchCode: 'B2023005', productName: '高压阀门A型', startDate: '2023-02-08', endDate: '2023-02-22', cycleDays: 14, plannedCycleDays: 12, cycleDiff: 2 },
    { batchCode: 'B2023006', productName: '液压泵B型', startDate: '2023-02-15', endDate: '2023-03-01', cycleDays: 14, plannedCycleDays: 16, cycleDiff: -2 }
  ],
  
  // 周期报告
  cycleReport: {
    avgCycle: 14.2,
    minCycle: 11,
    maxCycle: 18
  }
};

// 进度监控的mock数据
export const progressMonitorMockData = {
  // 产品选项
  productOptions: [
    { id: 1, name: '高压阀门A型' },
    { id: 2, name: '液压泵B型' },
    { id: 3, name: '精密轴承C型' },
    { id: 4, name: '控制器D型' }
  ],
  
  // 状态选项
  statusOptions: [
    { value: 'PLANNED', label: '计划中' },
    { value: 'IN_PROGRESS', label: '生产中' },
    { value: 'COMPLETED', label: '已完成' },
    { value: 'DELAYED', label: '已延期' },
    { value: 'CANCELLED', label: '已取消' }
  ],
  
  // 仪表盘数据
  dashboard: {
    plannedCount: 8,
    inProgressCount: 12,
    completedCount: 45,
    delayedCount: 5,
    completionRate: 78,
    plannedQuantity: 2500,
    actualQuantity: 1950
  },
  
  // 状态分布数据（用于图表）
  statusDistribution: [
    { value: 8, name: '计划中' },
    { value: 12, name: '生产中' },
    { value: 45, name: '已完成' },
    { value: 5, name: '已延期' },
    { value: 2, name: '已取消' }
  ],
  
  // 预警列表
  warningList: [
    { batchCode: 'B2023007', productName: '高压阀门A型', plannedEndDate: '2023-03-15', estimatedEndDate: '2023-03-18', delayDays: 3, progress: 65, riskLevel: 'HIGH' },
    { batchCode: 'B2023009', productName: '精密轴承C型', plannedEndDate: '2023-03-20', estimatedEndDate: '2023-03-22', delayDays: 2, progress: 70, riskLevel: 'MEDIUM' },
    { batchCode: 'B2023010', productName: '控制器D型', plannedEndDate: '2023-03-25', estimatedEndDate: '2023-03-25', delayDays: 0, progress: 85, riskLevel: 'LOW' },
    { batchCode: 'B2023011', productName: '液压泵B型', plannedEndDate: '2023-03-28', estimatedEndDate: '2023-03-26', delayDays: -2, progress: 90, riskLevel: 'NONE' },
    { batchCode: 'B2023012', productName: '高压阀门A型', plannedEndDate: '2023-04-01', estimatedEndDate: '2023-04-05', delayDays: 4, progress: 50, riskLevel: 'HIGH' }
  ],
  
  // 甘特图数据
  ganttData: [
    {
      name: 'B2023007 高压阀门A型',
      values: [
        { x: '2023-02-25', y: '计划开始' },
        { x: '2023-03-15', y: '计划结束' },
        { x: '2023-02-27', y: '实际开始' },
        { x: '2023-03-18', y: '预计结束' }
      ]
    },
    {
      name: 'B2023008 液压泵B型',
      values: [
        { x: '2023-03-01', y: '计划开始' },
        { x: '2023-03-18', y: '计划结束' },
        { x: '2023-03-02', y: '实际开始' },
        { x: '2023-03-17', y: '预计结束' }
      ]
    },
    {
      name: 'B2023009 精密轴承C型',
      values: [
        { x: '2023-03-05', y: '计划开始' },
        { x: '2023-03-20', y: '计划结束' },
        { x: '2023-03-07', y: '实际开始' },
        { x: '2023-03-22', y: '预计结束' }
      ]
    },
    {
      name: 'B2023010 控制器D型',
      values: [
        { x: '2023-03-10', y: '计划开始' },
        { x: '2023-03-25', y: '计划结束' },
        { x: '2023-03-10', y: '实际开始' },
        { x: '2023-03-25', y: '预计结束' }
      ]
    },
    {
      name: 'B2023011 液压泵B型',
      values: [
        { x: '2023-03-15', y: '计划开始' },
        { x: '2023-03-28', y: '计划结束' },
        { x: '2023-03-15', y: '实际开始' },
        { x: '2023-03-26', y: '预计结束' }
      ]
    }
  ]
};

// 批次管理的mock数据
export const batchManagementMockData = {
  // 状态选项
  statusOptions: [
    { value: 'PLANNED', label: '计划中' },
    { value: 'IN_PROGRESS', label: '生产中' },
    { value: 'COMPLETED', label: '已完成' },
    { value: 'DELAYED', label: '已延期' },
    { value: 'CANCELLED', label: '已取消' }
  ],
  
  // 质量状态选项
  qualityStatusOptions: [
    { value: 'PENDING', label: '待检' },
    { value: 'PASSED', label: '合格' },
    { value: 'FAILED', label: '不合格' },
    { value: 'PARTIAL', label: '部分合格' }
  ],
  
  // 产品选项
  productOptions: [
    { id: 1, name: '高压阀门A型' },
    { id: 2, name: '液压泵B型' },
    { id: 3, name: '精密轴承C型' },
    { id: 4, name: '控制器D型' }
  ],
  
  // 批次列表
  batchList: [
    { id: 1, batchCode: 'B2023001', productName: '高压阀门A型', plannedQuantity: 100, actualQuantity: 98, plannedDate: '2023-01-05', actualDate: '2023-01-18', status: 'COMPLETED', qualityStatus: 'PASSED' },
    { id: 2, batchCode: 'B2023002', productName: '液压泵B型', plannedQuantity: 150, actualQuantity: 150, plannedDate: '2023-01-10', actualDate: '2023-01-25', status: 'COMPLETED', qualityStatus: 'PASSED' },
    { id: 3, batchCode: 'B2023003', productName: '精密轴承C型', plannedQuantity: 200, actualQuantity: 195, plannedDate: '2023-01-15', actualDate: '2023-02-02', status: 'COMPLETED', qualityStatus: 'PARTIAL' },
    { id: 4, batchCode: 'B2023004', productName: '控制器D型', plannedQuantity: 80, actualQuantity: 80, plannedDate: '2023-02-01', actualDate: '2023-02-12', status: 'COMPLETED', qualityStatus: 'PASSED' },
    { id: 5, batchCode: 'B2023005', productName: '高压阀门A型', plannedQuantity: 120, actualQuantity: 115, plannedDate: '2023-02-08', actualDate: '2023-02-22', status: 'COMPLETED', qualityStatus: 'PASSED' },
    { id: 6, batchCode: 'B2023006', productName: '液压泵B型', plannedQuantity: 180, actualQuantity: 175, plannedDate: '2023-02-15', actualDate: '2023-03-01', status: 'COMPLETED', qualityStatus: 'PASSED' },
    { id: 7, batchCode: 'B2023007', productName: '高压阀门A型', plannedQuantity: 100, actualQuantity: 65, plannedDate: '2023-02-25', actualDate: null, status: 'IN_PROGRESS', qualityStatus: 'PENDING' },
    { id: 8, batchCode: 'B2023008', productName: '液压泵B型', plannedQuantity: 150, actualQuantity: 120, plannedDate: '2023-03-01', actualDate: null, status: 'IN_PROGRESS', qualityStatus: 'PENDING' },
    { id: 9, batchCode: 'B2023009', productName: '精密轴承C型', plannedQuantity: 200, actualQuantity: 140, plannedDate: '2023-03-05', actualDate: null, status: 'IN_PROGRESS', qualityStatus: 'PENDING' },
    { id: 10, batchCode: 'B2023010', productName: '控制器D型', plannedQuantity: 80, actualQuantity: 68, plannedDate: '2023-03-10', actualDate: null, status: 'IN_PROGRESS', qualityStatus: 'PENDING' },
    { id: 11, batchCode: 'B2023011', productName: '液压泵B型', plannedQuantity: 180, actualQuantity: 162, plannedDate: '2023-03-15', actualDate: null, status: 'IN_PROGRESS', qualityStatus: 'PENDING' },
    { id: 12, batchCode: 'B2023012', productName: '高压阀门A型', plannedQuantity: 120, actualQuantity: 60, plannedDate: '2023-03-20', actualDate: null, status: 'DELAYED', qualityStatus: 'PENDING' },
    { id: 13, batchCode: 'B2023013', productName: '精密轴承C型', plannedQuantity: 150, actualQuantity: 0, plannedDate: '2023-03-25', actualDate: null, status: 'PLANNED', qualityStatus: 'PENDING' },
    { id: 14, batchCode: 'B2023014', productName: '控制器D型', plannedQuantity: 100, actualQuantity: 0, plannedDate: '2023-04-01', actualDate: null, status: 'PLANNED', qualityStatus: 'PENDING' },
    { id: 15, batchCode: 'B2023015', productName: '液压泵B型', plannedQuantity: 120, actualQuantity: 0, plannedDate: '2023-04-05', actualDate: null, status: 'PLANNED', qualityStatus: 'PENDING' }
  ],
  
  // 总数据量
  total: 15
}; 